'''
获取相关链接的信息
'''
import requests


class HTTP:
    def get(url, return_json=True):
        # 或取相关信息
        r = requests.get(url)
        if r.status_code == 200:
            if return_json:
                return r.json()
            else:
                return r.text
        else:
            if return_json:
                return {}
            else:
                return ''

